class HugeMushroomRenderer : public IBlockRenderer
{
public:
	ITexture *Texture;
	Point2i TexturePosition;

	HugeMushroomRenderer(ITexture *texture, const Point2i &pos) :
		Texture(texture),
		TexturePosition(pos)
	{
	}

	int GetTypeData(const int &data) { return data; }

	void Render(Schematic *schematic, RendererBase *renderer, const Block &block, const Point3i &position)
	{
		Point2i pore(14 * 16, 8 * 16), stem(13 * 16, 8 * 16);
		Box box(Texture);

		box.SetAll(pore);

		switch (block.Data)
		{
		case 15:
			box.SetAll(TexturePosition);
			break;
		case 14:
			box.SetAll(stem);
			break;
			
		case 1:
			box.SetTop(TexturePosition).SetWest(TexturePosition).SetNorth(TexturePosition);
			break;
		case 2:
			box.SetTop(TexturePosition).SetNorth(TexturePosition);
			break;
		case 3:
			box.SetTop(TexturePosition).SetNorth(TexturePosition).SetEast(TexturePosition);
			break;
		case 4:
			box.SetTop(TexturePosition).SetWest(TexturePosition);
			break;
		case 5:
			box.SetTop(TexturePosition);
			break;
		case 6:
			box.SetTop(TexturePosition).SetEast(TexturePosition);
			break;
		case 7:
			box.SetTop(TexturePosition).SetSouth(TexturePosition).SetWest(TexturePosition);
			break;
		case 8:
			box.SetTop(TexturePosition).SetSouth(TexturePosition);
			break;
		case 9:
			box.SetTop(TexturePosition).SetEast(TexturePosition).SetSouth(TexturePosition);
			break;
		case 10:
			box.SetSides(stem).SetTop(pore).SetBottom(pore);
			break;
		}

		renderer->Draw(box);
	}
};